package com.jsh.erp.service.activiti.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jsh.erp.datasource.entities.activitti.SysDict;
import com.jsh.erp.datasource.mappers.activiti.SysDictMapper;
import com.jsh.erp.service.activiti.ISysDictService;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.system.vo.DictModel;
import org.jeecg.common.system.vo.DictQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author 86138
 * @date 2023-03-04 23:26:28
 * @description
 */
@Service
@Slf4j
public class SysDictServiceImpl extends ServiceImpl<SysDictMapper, SysDict> implements ISysDictService {

    @Resource
    private SysDictMapper sysDictMapper;
    /*@Autowired
    private SysDictItemMapper sysDictItemMapper;*/
    @Override
    public List<DictModel> queryDictItemsByCode(String code) {
        log.debug("无缓存dictCache的时候调用这里！");
        return sysDictMapper.queryDictItemsByCode(code);
    }

    @Override
    public Map<String, List<DictModel>> queryAllDictItems() {
        return null;
    }

    @Override
    public List<DictModel> queryTableDictItemsByCode(String table, String text, String code) {
        log.debug("无缓存dictTableList的时候调用这里！");
        return sysDictMapper.queryTableDictItemsByCode(table,text,code);
    }

    @Override
    public List<DictModel> queryTableDictItemsByCodeAndFilter(String table, String text, String code, String filterSql) {
        log.debug("无缓存dictTableList的时候调用这里！");
        return sysDictMapper.queryTableDictItemsByCodeAndFilter(table,text,code,filterSql);
    }

    @Override
    public String queryDictTextByKey(String code, String key) {
        return null;
    }

    @Override
    public String queryTableDictTextByKey(String table, String text, String code, String key) {
        return null;
    }

    @Override
    public List<String> queryTableDictByKeys(String table, String text, String code, String keys) {
        return null;
    }

    @Override
    public boolean deleteByDictId(SysDict sysDict) {
        return false;
    }

    @Override
    public List<DictModel> queryAllDepartBackDictModel() {
        return null;
    }

    @Override
    public List<DictModel> queryAllUserBackDictModel() {
        return null;
    }

    @Override
    public List<DictModel> queryTableDictItems(String table, String text, String code, String keyword) {
        return null;
    }

    @Override
    public void deleteOneDictPhysically(String id) {

    }

    @Override
    public void updateDictDelFlag(int delFlag, String id) {

    }

    @Override
    public List<SysDict> queryDeleteList() {
        return null;
    }

    @Override
    public List<DictModel> queryDictTablePageList(DictQuery query, int pageSize, int pageNo) {
        return null;
    }

    @Override
    public List<SysDict> selectAllDict(SysDict sysDict, int currentPage, int pageSize) {
        List<SysDict> list = null;
        list = sysDictMapper.selectAllDict(sysDict,currentPage,pageSize);
        return list;
    }

    @Override
    public Long countDict() {
        return sysDictMapper.countDict();
    }
}
